1. Field of the Invention
The present invention relates to packet streams, and more particularly, to spacing of multiple packet streams to provide a single output stream.
2. Description of the Related Art
It is known to provide a transmitter which receives multiple input streams of information and provides a single output stream of information. Often times the input streams and the output stream are divided into packets where each packet includes a certain number of bits of the bit stream. The packets are transmitted in slots, where a slot represents an opportunity to transmit data in the output stream. For example, a server, such as a video server, may serve multiple, simultaneous, constant bit-rate packet streams. Such a server may transmit several video clips simultaneously. In such a server, it is desirable that the packets of each individual stream be spaced equally apart. For example, FIG. 1 shows an example of distributing 1024 slots across a 1 second cycle time. In this example, a packet of information is transmitted every 0.976 msec
Equally spacing the packets of information is challenging when multiple streams of information are being simultaneously transmitted. For example, if first stream (e.g., stream A) were transmitting 10 packets per second, the packets would desirably be spaced 100 msec apart (i.e., a packet spacing of 100 msec.). If another stream (e.g., Stream B) were transmitting 20 packets per second, the packets would desirably be spaced 50 msec apart. However, the combination of stream A and stream B transmit 30 packets per second; evenly spacing these packets would require that the packets be spaced 33 msec apart.
It is known to provide the transmitter with a packet scheduler that is responsible for transmitting all of these streams. The scheduler sits in a loop, and sleeps for some time (e.g., 33 msec in the above example) after which the scheduler wakes up. When the scheduler wakes up, it determines whether to transmit a packet from stream A or stream B. This determination is challenging as in general, there may be several streams from which the scheduler must choose when determining from which stream to transmit a packet. In this situation it is very difficult to determine from which stream to transmit a packet while maintaining the packets equally spaced from other transmitted packets.